I have powershell query to export incidents which are raised, but here i am getting only 25 records. I needed 3 help here.
- Needed all data
- how to export it in CSV format
- can i schedule this report on monthly basisâŚ
When i fetch data i am getting all these feilds, and the same has to come in csv tableâŚ
id incident_number description service_id service_name escalation_policy_id escalation_policy_name created_on resolved_on seconds_to_first_ack seconds_to_resolve auto_resolved escalation_count auto_escalation_count acknowledge_count assignment_count acknowledged_by_user_ids acknowledged_by_user_names assigned_to_user_ids assigned_to_user_names resolved_by_user_id resolved_by_user_name urgency
$headers=@{}
$headers.Add(âacceptâ, âapplication/vnd.pagerduty+json;version=2â)
$headers.Add(âcontent-typeâ, âapplication/jsonâ)
$headers.Add(âauthorizationâ, âToken token=xxxxxxxxxxxxxâ)
$response = Invoke-RestMethod -Uri âhttps://api.pagerduty.com/incidents?service_ids[]=xxxxxâ -Method GET -Headers $headers